package o;

import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.extractor.ts.TsPayloadReader.a;
import java.util.List;

public final class agt {
    private final List<Format> ˋ;
    private final aef[] ˎ;

    public agt(List<Format> list) {
        this.ˋ = list;
        this.ˎ = new aef[list.size()];
    }

    public void ˏ(ady o_ady, a aVar) {
        for (int i = 0; i < this.ˎ.length; i++) {
            aVar.ˊ();
            aef ˊ = o_ady.ˊ(aVar.ˏ(), 3);
            Format format = (Format) this.ˋ.get(i);
            String str = format.ʽ;
            boolean z = "application/cea-608".equals(str) || "application/cea-708".equals(str);
            amm.ˊ(z, "Invalid closed caption mime type provided: " + str);
            ˊ.ˎ(Format.ˏ(format.ॱ != null ? format.ॱ : aVar.ˎ(), str, null, -1, format.ʾ, format.ˋˊ, format.ˊᐝ, null, Long.MAX_VALUE, format.ʼ));
            this.ˎ[i] = ˊ;
        }
    }

    public void ˋ(long j, anc o_anc) {
        ajv.ॱ(j, o_anc, this.ˎ);
    }
}
